#ifndef INCLUDED_ISOMETRICMAP_H
#define INCLUDED_ISOMETRICMAP_H
#include <SGE.h>

using namespace SGE;
class IsoMetricMap
{
public:
	IsoMetricMap();
	~IsoMetricMap();
	void Load(const char* pLevel, const char* pTexturePack);
	void Unload();
	void Update(float deltaTime);
	void Render(const SVector2& viewOffset);

	int getWidth2D()	const	{return mColumns*mTileSizeW;}
	int getHeight2D()	const	{return mRows*mTileSizeH;}
private:
	bool LoadLevel(const char* pLevel);
	bool LoadTexturePack(const char* pTexturePack);
	int GetIndex2D(int x, int y) const;

	SGE_Sprite *mpSprites;
	int *mpTiles;

	int mNumSprites,
			mTileSizeH,
			mTileSizeW,
			mColumns,
			mRows;
};

#endif